FROM lizhi1803001230/jdk:1.8.0_202

ARG uid=bigdata02

COPY daemon.sh /opt/daemon.sh
COPY entrypoint.sh /opt/entrypoint.sh
COPY tini /usr/bin/tini
#COPY conf /etc/hadoop-conf
COPY hadoop-2.10.1 /opt/hadoop-2.10.1
RUN ln -s /opt/hadoop-2.10.1 /opt/hadoop && \
    yum install -y which && \
    yum install -y nc && \
    useradd ${uid} 
ENV HADOOP_HOME=/opt/hadoop
#ENV HADOOP_CONF_DIR=/etc/hadoop-conf
ENV PATH=$HADOOP_HOME/bin:$HADOOP_HOME/sbin:$PATH
ENV HADOOP_LOG_DIR=/data1/logs
ENV HADOOP_PID_DIR=/data1 

ENTRYPOINT [ "/opt/entrypoint.sh" ]
USER ${uid}
